package proxy.agent.impl;

import proxy.agent.UserInterface;

/**
 * @package proxy.agent.impl
 * @Class UserInterfaceProxy
 * @Description TODO
 * @Author zhangxinhua
 * @Date 19-11-28 上午9:23
 */
public class UserInterfaceProxy implements UserInterface {
    private UserInterface userInterface;

    public UserInterfaceProxy(UserInterface userInterface) {
        this.userInterface = userInterface;
    }

    @Override
    public String getUserName() {
        String userName = userInterface.getUserName();
        System.out.println("我拦截到用户姓名:"+userName);
        return userName;
    }

    @Override
    public void registerUser(Object user) {
        System.out.println("我不想让你注册。滚回去");
    }
}
